﻿using University.Workshop.Business;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

namespace University.Workshop.Tests
{
    
    
    /// <summary>
    ///This is a test class for ValidateTest and is intended
    ///to contain all ValidateTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ValidateTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for ValidateUserName
        ///</summary>
        [TestMethod()]
        public void ValidateUserNameTest()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string user = "armando"; // TODO: Initialize to an appropriate value
            bool expected = true; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.ValidateUserName(user,"");
            Assert.AreEqual(expected, actual);
        }

        /// <summary>
        ///A test for ValidateUserName
        ///</summary>
        [TestMethod()]
        public void ValidateUserNameTestNegative()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string user = "Toro de"; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.ValidateUserName(user,"");
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for ValidateUserLength
        ///</summary>
        [TestMethod()]
        public void ValidateUserLengthTest()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string user = "user"; // TODO: Initialize to an appropriate value
            string expected = "User name too short"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ValidateUserLength(user);
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for ValidateUserLength
        ///</summary>
        [TestMethod()]
        public void ValidateUserLengthTest1()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string user = "JuanitoPerezDiazdelaSantisimaTrinidad"; // TODO: Initialize to an appropriate value
            string expected = "User name too long"; // TODO: Initialize to an appropriate value
            string actual;
            actual = target.ValidateUserLength(user);
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for ValidatePassword
        ///</summary>
        [TestMethod()]
        public void ValidatePasswordTest()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string password = "user.com"; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.ValidatePassword(password);
            Assert.AreEqual(expected, actual);
            
        }

        /// <summary>
        ///A test for ValidateEmail
        ///</summary>
        [TestMethod()]
        public void ValidateEmailTest()
        {
            Validate target = new Validate(); // TODO: Initialize to an appropriate value
            string email = "yo.com"; // TODO: Initialize to an appropriate value
            bool expected = false; // TODO: Initialize to an appropriate value
            bool actual;
            actual = target.ValidateEmail(email);
            Assert.AreEqual(expected, actual);
        }
    }
}
